//
//  WiFiWebViewController.m
//  Wifi
//
//  Created by srulos on 2017/6/14.
//  Copyright © 2017年 srulos. All rights reserved.
//

#import "SpeedTestWebViewController.h"
#import "WifiHeader.h"

@interface SpeedTestWebViewController ()<UIWebViewDelegate>

@end

@implementation SpeedTestWebViewController
- (void)viewWillAppear:(BOOL)animated{
    [self.navigationController.navigationBar setHidden:NO];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = K_NSLOCAL(@"SpeedTest");
    _m_webView.delegate = self;
    [_m_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.speedtest.cn/SpeedTest/index.plugin.min.php"]]];
    
    SHOW_HUD(K_NSLOCAL(@"loading"));
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)webViewDidStartLoad:(UIWebView *)webView{
    
}

- (void)webViewDidFinishLoad:(UIWebView *)webView{
    [webView stringByEvaluatingJavaScriptFromString:@"$(\".more-server\").remove();$(\".version\").remove();$(\".share\").remove();$(\"#mybook\").remove();"];
    HIDE_HUD;
}

@end
